import { defineStore } from 'pinia'

export const useIndexStore = defineStore('index', {
    // data
  state: () => {
    return {
      list_is_active: false,
      config:{},
      pwd:{},
      web:{},
      param:{}
    } 
  },
  actions:{
    set_list_is_active(){
      this.list_is_active = !this.list_is_active
    },
    set_config(config){
      this.config = config
    },
    set_pwd(pwd){
      this.pwd = pwd
    },
    set_web(web){
      this.web = web
    },
    add_web_list(item){
      this.web.web_list.push(item)
    },
    set_param(param){
      this.param = param
    },
  }
})
    